from django import forms
from captcha.fields import CaptchaField

class UserLoginFrom(forms.Form):
    username = forms.CharField(required=True)
    password = forms.CharField(required=True)
    captcha = CaptchaField(error_messages={"invalid": "验证码错误"})  # 加入这条
